#pragma once
#include <Arduino.h>
#include "led_driver.h"

// 基础效果类
class BaseEffect {
public:
    virtual ~BaseEffect() = default;
    
    // 初始化效果
    virtual void init(LEDDriver* driver) = 0;
    
    // 更新效果
    virtual void update() = 0;
    
    // 获取效果名称
    virtual const char* getName() const = 0;
};

// 静态颜色效果
class StaticColorEffect : public BaseEffect {
public:
    StaticColorEffect(uint8_t r, uint8_t g, uint8_t b);
    
    void init(LEDDriver* driver) override;
    void update() override;
    const char* getName() const override;
    
private:
    LEDDriver* ledDriver;
    uint8_t r, g, b;
};

// 呼吸灯效果
class BreathingEffect : public BaseEffect {
public:
    BreathingEffect(uint8_t r, uint8_t g, uint8_t b);
    
    void init(LEDDriver* driver) override;
    void update() override;
    const char* getName() const override;
    
private:
    LEDDriver* ledDriver;
    uint8_t r, g, b;
    float brightness;
    int direction;
};